<template>
  <div id="Navigation" :style="menuStyle">
        <el-menu
            default-active="1"
            class="el-menu-vertical-demo"
            @select="findUser"
            background-color="#545c64"
            text-color="#fff"
            active-text-color="#ffd04b"
        style="height: 100%">
        >
<!--          <el-menu-item index="2" v-model="index">-->
<!--            <i class="el-icon-menu"></i>-->
<!--            <span slot="title">主页</span>-->
<!--          </el-menu-item>-->
          <el-menu-item index="3" v-model="index">
            <i class="el-icon-menu"></i>
            <span slot="title">投标</span>
          </el-menu-item>
          <el-menu-item index="4" v-model="index">
            <i class="el-icon-menu"></i>
            <span slot="title">订单</span>
          </el-menu-item>
          <el-menu-item index="5" v-model="index">
            <i class="el-icon-menu"></i>
            <span slot="title">物流</span>
          </el-menu-item>
          <el-menu-item index="6" v-model="index">
            <i class="el-icon-menu"></i>
            <span slot="title">财务</span>
          </el-menu-item>
          <el-menu-item index="7" v-model="index">
            <i class="el-icon-menu"></i>
            <span slot="title">产品</span>
          </el-menu-item>
        </el-menu>
  </div>
</template>

<script>
export default {
  name: "Navigation",
  data(){
    return{
      show:false,
      index:"",

      menuStyle:{
        width: '120px',
        height: '100%',
      }
    }
  },

  methods:{
    findUser(index){
      // if(localStorage.getItem("state") == '2'){
      //   this.$message.warning("你还不是供应商，不能访问此页面！")
      //   return
      // }
      if(index==2){
        this.$router.push("Home")  //用vue路由到组件中去
      }
      if(index==3){
        this.$router.push("biding")  //用vue路由到组件中去
      }
      if(index==4){
        this.$router.push("order")
      }
      if(index==5){
        this.$router.push("Logistics")  //用vue路由到组件中去
      }
      if(index==6){
        this.$router.push("Finance")  //用vue路由到组件中去
      }
      if(index==7){
        this.$router.push("Product")
      }
      if(index==8){
        this.$router.push("set")  //用vue路由到组件中去
      }
      if(index==9){
        this.$router.push("changePassword")  //用vue路由到组件中去
      }
      // if(index==9){
      //   this.$router.push("Compensate")  //用vue路由到组件中去
      // }

    },
    close(){
      console.log(1)
    },
    closeLogin(str){
      this.name = "欢迎您" + str + "!"
      this.show = false
    },

  }
}
</script>

<style scoped>
#Navigation{

}
</style>